var n = getApp();

Page({
    data: {
        name: "",
        num: "",
        bank: [],
        info: {}
    },
    onLoad: function(n) {},
    onReady: function() {},
    onShow: function() {
        this.initData(), this.getInfo(), this.getBank();
    },
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {},
    numInp: function(n) {
        var t = n.detail.value;
        this.setData({
            num: t
        });
    },
    initData: function() {
        this.setData({
            name: "",
            num: "",
            bank: [],
            info: {}
        });
    },
    getBank: function() {
        var t = this, a = n.getNetAddresss("plugin.converge_pay.frontend.controllers.quick-pay-bank-card.index");
        n._getNetWork({
            url: a,
            showToastIn: !1,
            success: function(n) {
                var a = n.data;
                a.result, t.setData({
                    bank: a.data
                });
            },
            fail: function(n) {
                console.log(n.msg);
            }
        });
    },
    next: function() {
        n._isTextEmpty(this.data.num) ? wx.showToast({
            icon: "none",
            title: "请输入卡号",
            duration: 1500
        }) : wx.navigateTo({
            url: "/packageD/quickPay/member_add_bank_second/member_add_bank_second?card_no=" + this.data.num
        });
    },
    getInfo: function() {
        var t = this, a = n.getNetAddresss("plugin.converge_pay.frontend.controllers.quick-pay-bank-card.get-payer-info");
        n._getNetWork({
            url: a,
            showToastIn: !1,
            success: function(n) {
                var a = n.data;
                1 == a.result && t.setData({
                    info: a.data
                });
            },
            fail: function(n) {
                console.log(n.msg);
            }
        });
    }
});